/*
 * Tokens.h
 *
 *  Created on: Feb 21, 2012
 *      Author: marchi
 */

#ifndef TOKENS_H_
#define TOKENS_H_
#include <boost/regex.hpp>
#include <string>
#include <vector>
#include <map>
#include <iostream>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/regex.hpp>

using namespace boost;

using std::string;
using std::vector;
using std::map;
namespace TokenNS {
static regex re_sep0("\\[ ([A-Z][A-Z0-9]*) \\]");
static regex re_sep1("\\[ *(\\w*) *\\]");
static regex re_comm(";.*$");

typedef map<string,string>::iterator Iterator_map;
typedef map<string,map<string,string> >::iterator Iterator_maps;
typedef map<string,map<string,string> >::const_iterator Iterator_cmaps;

class Tokens {
	map<string,map<string,string> > imap;
public:
	Tokens();
	Tokens(string y);
	virtual ~Tokens();
	map<string,string> &  operator[](string y){return this->imap[y];};
	map<string,map<string,string> >::iterator  begin(){return imap.begin();};
	map<string,map<string,string> >::iterator  end(){return imap.end();};
};

} /* namespace Tokens */
#endif /* TOKENS_H_ */
